查看原文
其他

scRNAtoolVis 尝试一下?

The following article is from 老俊俊的生信笔记 Author JunJunLab

1引言

基于前面两篇推文 单细胞绘图数据提取个性化绘图左下角自定义箭头坐标轴 (批量添加和美化), 群里有小伙伴建议我写成 package 的形式,确实代码多了每次得运行一下写的 function 才能后续操作,麻烦了一点。于是尝试写了一个简单的包,大家下载直接用会方便很多。

githup 地址:

https://github.com/junjunlab/scRNAtoolVis

2安装

install.packages('devtools')
devtools::install_github('junjunlab/scRNAtoolVis')

library(scRNAtoolVis)

3测试

加载测试数据:

test <- system.file("extdata""seuratTest.RDS", package = "scRNAtoolVis")
tmp <- readRDS(test)

seurat metadata 里的分类变量进行分面,当然画在一起也是可以的:

# facet by metadata column "orig.ident"
clusterCornerAxes(object = tmp,reduction = 'umap',
                  noSplit = F,groupFacet = 'orig.ident',
                  relLength = 0.5)

noSplit = T 指定不分面:

# umap
clusterCornerAxes(object = tmp,reduction = 'umap',
                  noSplit = T)

axes = 'one' 保留一个左下角坐标:

# retain only one axes
clusterCornerAxes(object = tmp,reduction = 'umap',
                  noSplit = F,groupFacet = 'orig.ident',
                  relLength = 0.5,
                  axes = 'one')

tSNE 降维可视化:

# tsne
clusterCornerAxes(object = tmp,reduction = 'tsne',
                  noSplit = F,groupFacet = 'orig.ident',
                  relLength = 0.5)

FeatureCornerAxes 展示基因的表达量:

# tsne
FeatureCornerAxes(object = tmp,reduction = 'tsne',
                  groupFacet = 'orig.ident',
                  relLength = 0.5,relDist = 0.2,
                  features = c("Actb","Ythdc1""Ythdf2"))

更多参数见参考文档哦。

4结尾


githup 上面也有使用说明。



  





Seurat 官网单细胞教程四 (细胞周期矫正)

跟着 Nature medicine 学单细胞数据分析

单细胞亚群分面可视化

跟着 Nature medicine 学画图-tSNE

单细胞亚群 Marker 基因热图重绘及均值展示

Seurat 官网单细胞教程四 (SCTransform 使用及 SCTransform V2 版本)

Seurat 官网单细胞教程三 (RPCA 快速整合数据)

ggplot 随心所欲的添加注释

Seurat 官网单细胞教程一 (数据整合)

NC 文章单细胞部分图复现

◀...

您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存